import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { Cache } from "../../../cache/Cache";
import { EPublicCommand } from "../../../../../Message/Command/EPublicCommand";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class LoveTaskPartnerStartCommand
    
    export  class LoveTaskPartnerStartCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            super.call(arg1);
            var loc1=arg1.messageBase["fromPlayer"];
            var loc2=Cache.instance.loveTask;
            if (loc2.isStartPlayer) 
            {
                loc2.toPlayer = loc1;
            }
            else 
            {
                loc2.fromPlayer = loc1;
            }
            var loc3=type == EPublicCommand._ECmdPublicCrossPartnerStart;
            loc2.invitedIsFromCrossCity = loc3;
            NetDispatcher.dispatchCmd(ServerCommand.LoveTaskPartnerStart, loc1);
            return;
        }
    }
